package com.xk.controller;

import com.cms.common.core.web.domain.Response;

import com.cms.common.log.annotation.Log;
import com.cms.common.log.enums.BusinessType;
import com.xk.domain.vo.TestPaperingVo;
import com.xk.service.TestPaperService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 学生的Controller
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/student")
public class StuentController {

    /**
     * 试卷表
     */
    private final TestPaperService testPaperService;


    /**
     * 开始考试<br>
     *  学生请求考试api时候会先生成试卷<br>
     *
     * @return
     */
    @GetMapping("/start")
    // 权限格式为：模块:功能:操作
//    @RequiresPermissions("qu:student:start")
    @Log(title = "申请开始考试", businessType = BusinessType.INSERT)
    public Response<TestPaperingVo>  startTheExamination(){
        return testPaperService.startTheExamination();
    }
}
